GET /api/agent/credit-notes/{id}
Drill into one AR credit note by its Xero GUID (externalId) OR its creditNoteNumber (CN-####). Returns the list shape plus lineItems (nullable — null when the line-item sync fetch hasn't yet succeeded) and allocations[] (the invoices it's been applied to, with amount + date). A sensitive contact returns 404 (existence-hiding) unless the key carries READ_SENSITIVE.
Auth
- Required scope:
READ_INVOICES - Header:
Authorization: Bearer cr_live_<prefix>_<secret>
Query parameters
| Name | Type | Required | Notes |
|---|---|---|---|
id | string | yes | Xero CreditNoteID (GUID) or CreditNoteNumber (CN-####). |
Responses
200 — The credit note with line items + allocations.
Body: CreditNoteDrillResponse
| Field | Type | Required | Notes |
|---|---|---|---|
creditNote | CreditNoteDrill | yes | |
redactedItemCount | integer | yes | |
billingAlert | BillingAlert | no | |
xeroAlert | XeroAlert | no |
401 — Unauthorized
Body: ErrorResponse
| Field | Type | Required | Notes |
|---|---|---|---|
error | string | yes |
404 — Not found, or sensitive without READ_SENSITIVE.
Response headers
Every successful response carries X-CashRunway-Subscription, X-CashRunway-Plan, X-CashRunway-Quota-Remaining, and X-CashRunway-Quota-Reset. Trialing subscriptions also include X-CashRunway-Trial-Days-Remaining. See the overview for details.